package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter@Setter
public class InWarehouse {
    //未审核状态
   public static final Integer NORMAL = 1;
   //已审核状态
   public static final Integer AUDIT = 2;

    private Long id;
    //采购入库单号
    private String sn;
    //业务时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")//前台传后台的日期格式化
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")//后台传前台的日期格式化
    private Date vdate;
    //单据状态
    private Integer status = NORMAL;    //默认未审核
    //采购入库总额
    private BigDecimal totalAmount;
    //采购入库总数
    private BigDecimal totalNumber;
    //审核时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")//前台传后台的日期格式化
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")//后台传前台的日期格式化
    private Date auditTime;
    //录入时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")//前台传后台的日期格式化
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")//后台传前台的日期格式化
    private Date inputTime;
    //录入人
    private Employee inputUser;
    //审核人
    private Employee auditor;
    //供应商
    private Supplier supplier;
    //仓库
    private Depot depot;

    //关联订单明细
    private List<InWarehouseItem> items = new ArrayList<>();

}